export default ({
  state:{  //状态
    isCollapse:false,
    currentMenu:null,
  },
  mutations:{  //改变
      collapseMenu(state){//改变方法，传递state
          state.isCollapse = !state.isCollapse;
      },
      selectMenu(state,val){
        val.name === "home" ?(state.currentMenu = null) : state.currentMenu = val
      }
  }
})
